'use strict';
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const r = require('./cst-scalar.cjs'),
  n = require('./cst-stringify.cjs'),
  u = require('./cst-visit.cjs'),
  a = '\uFEFF',
  t = '',
  s = '',
  c = '',
  l = e => !!e && 'items' in e,
  i = e =>
    !!e &&
    (e.type === 'scalar' ||
      e.type === 'single-quoted-scalar' ||
      e.type === 'double-quoted-scalar' ||
      e.type === 'block-scalar');
function o(e) {
  switch (e) {
    case a:
      return '<BOM>';
    case t:
      return '<DOC>';
    case s:
      return '<FLOW_END>';
    case c:
      return '<SCALAR>';
    default:
      return JSON.stringify(e);
  }
}
function d(e) {
  switch (e) {
    case a:
      return 'byte-order-mark';
    case t:
      return 'doc-mode';
    case s:
      return 'flow-error-end';
    case c:
      return 'scalar';
    case '---':
      return 'doc-start';
    case '...':
      return 'doc-end';
    case '':
    case `
`:
    case `\r
`:
      return 'newline';
    case '-':
      return 'seq-item-ind';
    case '?':
      return 'explicit-key-ind';
    case ':':
      return 'map-value-ind';
    case '{':
      return 'flow-map-start';
    case '}':
      return 'flow-map-end';
    case '[':
      return 'flow-seq-start';
    case ']':
      return 'flow-seq-end';
    case ',':
      return 'comma';
  }
  switch (e[0]) {
    case ' ':
    case '	':
      return 'space';
    case '#':
      return 'comment';
    case '%':
      return 'directive-line';
    case '*':
      return 'alias';
    case '&':
      return 'anchor';
    case '!':
      return 'tag';
    case "'":
      return 'single-quoted-scalar';
    case '"':
      return 'double-quoted-scalar';
    case '|':
    case '>':
      return 'block-scalar-header';
  }
  return null;
}
exports.createScalarToken = r.createScalarToken;
exports.resolveAsScalar = r.resolveAsScalar;
exports.setScalarValue = r.setScalarValue;
exports.stringify = n.stringify;
exports.visit = u.visit;
exports.BOM = a;
exports.DOCUMENT = t;
exports.FLOW_END = s;
exports.SCALAR = c;
exports.isCollection = l;
exports.isScalar = i;
exports.prettyToken = o;
exports.tokenType = d;
